const AJAX_CONST_MAP={
  "a1":"$.ajax({\n" +
    "\ttype: \"GET\",\n" +
    "\turl: \"https://www.runoob.com/try/demo_source/demo_test.txt\",\n" +
    "\tdata: {},\n" +
    "\tdataType: \"json\",\n" +
    "\tsuccess: function(res) {\n" +
    "\t\tlog.info(\"ajax请求成功!\");\n" +
    "\t\tlog.info(res.data)\n" +
    "\t},\n" +
    "\terror: function(res) {\n" +
    "\t\tlog.info(\"ajax请求出现错误!\");\n" +
    "\t\tlog.info(res.data)\n" +
    "\t}\n" +
    "});\n",
  "a2":"$.ajax({\n" +
    "\ttype: \"POST\",\n" +
    "\turl: \"https://www.runoob.com/try/ajax/demo_test_post.php\",\n" +
    "\tdata: {\n" +
    "\t\tname: \"菜鸟教程\",\n" +
    "\t\turl: \"http://www.runoob.com\"\n" +
    "\t},\n" +
    "\tdataType: \"json\",\n" +
    "\tsuccess: function(res) {\n" +
    "\t\tlog.info(\"ajax请求成功!\");\n" +
    "\t\tlog.info(JSON.stringify(res))\n" +
    "\t},\n" +
    "\terror: function(res) {\n" +
    "\t\tlog.info(\"ajax请求出现错误!\");\n" +
    "\t\tlog.info(JSON.stringify(res))\n" +
    "\t}\n" +
    "});",
  "b1":"$.ajax({\n" +
    "\ttype: \"POST\",\n" +
    "\turl: \"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx\",\n" +
    "\tdata: {\n" +
    "\t\t\"msgtype\": \"text\",\n" +
    "    \t        \"text\": {\n" +
    "        \t    \"content\": \"hello world\"\n" +
    "    \t       }\n" +
    "\t},\n" +
    "\tdataType: \"json\",\n" +
    "\tsuccess: function(res) {\n" +
    "\t\tlog.info(\"ajax请求成功!\");\n" +
    "\t\tlog.info(JSON.stringify(res))\n" +
    "\t},\n" +
    "\terror: function(res) {\n" +
    "\t\tlog.info(\"ajax请求出现错误!\");\n" +
    "\t\tlog.info(JSON.stringify(res))\n" +
    "\t}\n" +
    "});",
}

const AJAX_CONST_MENUS=[{
  name: "Ajax请求",
  children: [{
    name: "GET请求",
    key: "a1"
  }, {
    name: "POST请求",
    key: "a2"
  }]
}, {
  name: "企业微信群机器人",
  children: [{
    name: "文本消息",
    key: "b1"
  }, {
    name: "markdown消息",
    key: "b2"
  }, {
    name: "图片消息",
    key: "b3"
  }, {
    name: "图文消息",
    key: "b4"
  }]
}, {
  name: "钉钉群机器人",
  children: []
}]
export {AJAX_CONST_MAP,AJAX_CONST_MENUS}
